package cn.fsd.service;

import cn.fsd.domain.Order;
import cn.fsd.dto.ExchangeOrderDTO;
import cn.fsd.dto.OrderDTO;
import cn.fsd.exception.CustomerException;
import cn.fsd.query.customer.OrderQuery;
import cn.fsd.query.delivery.PurchaseBean;
import cn.fsd.vo.OrderCommodityVO;
import cn.fsd.vo.OrderVO;
import com.github.pagehelper.PageInfo;

import java.util.List;

public interface OrderService {

  //                          查询方法
  List<OrderCommodityVO> getOrdersOfCustomer(String customer_id);

  Order getOrderById(String orderId);

  Boolean checkStockOutByTransfer(Order order);

  PageInfo<OrderVO> findVOByConditionByPage(OrderQuery orderQuery);


  //                          订单创建
  Boolean checkStockOutRemote(OrderDTO orderDTO);

  void newPurchaseOrder(OrderDTO orderDTO);


  //                          订单处理
  void changeOrderStatus(String order_id, String status);

  void cancelOrder(String order_id) throws CustomerException;

  String newExchangeOrder(ExchangeOrderDTO exchangeOrderDTO);

  String newReturnOrder(ExchangeOrderDTO exchangeOrderDTO);

  //配送微服务需要的接口
  List<PurchaseBean> getPurchaseList();

  void changeDeliveryStatus(String order_id, String status);

  Integer getUserNum();
}
